<template>
  <div class="detail-container">
    <div class="common-w-box">
      <div class="cnb">
        <div class="title">{{ dataBaseArticleDetail.articleName }}</div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { reqGetDataBaseArticleDetail } from '@/api/database.ts'
import { useRoute } from 'vue-router'
import { respDataBaseArticleDetail } from '@/api/types/database'

const route = useRoute()
const id = route.query.id || ''

onMounted(() => getDataBaseArticleDetail())

const dataBaseArticleDetail = ref<respDataBaseArticleDetail>({})
const getDataBaseArticleDetail = async () => {
  const { data } = await reqGetDataBaseArticleDetail(id)
  dataBaseArticleDetail.value = data
}
</script>

<style lang="scss" scoped>
.detail-container {
  margin: 16px 0;

  .cnb {
    padding: 20px;
    background: #fff;
    border-radius: 4px;

    .title {
      font-size: 16px;
      font-weight: 500;
      line-height: 20px;
      color: #021429;
      text-align: center;
    }

    .gray {
      color: #021429;
    }
  }
}
</style>
